<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>ERP</title>
</head>
 <style>
        h1 {
            font-size: 2em; /* 设置字体大小 */
            color: #4CAF50; /* 设置字体颜色 */
            text-align: center; /* 设置文本居中 */
            padding: 20px; /* 设置内边距 */
            border-bottom: 2px solid #4CAF50; /* 设置下边框 */
        }
        h2 {
            font-size: 1.5em; /* 设置字体大小 */
            color: #333; /* 设置字体颜色 */
            text-align: left; /* 设置文本居左对齐 */
            padding: 10px; /* 设置内边距 */
            border-bottom: 1px solid #333; /* 设置下边框 */
        }
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            background-color: #f0f0f0;
        }
        .container {
            width: 80%;
            margin: 0 auto;
            padding: 20px;
        }
        form {
            background-color: #fff;
            padding: 20px;
            border-radius: 5px;
            display: flex;
            justify-content: space-between;
        }
        label {
            display: block;
            margin-bottom: 10px;
        }
        input[type="text"], input[type="number"], input[type="date"] {
            width: 100%;
            padding: 10px;
            border-radius: 5px;
            border: 1px solid #ccc;
        }
        select{
            width: 100%;
            padding: 10px;
            border-radius: 5px;
            border: 1px solid #ccc;
        }
        input[type="submit"] {
            background-color: #4CAF50;
            color: white;
            padding: 14px 20px;
            margin: 10px 0;
            border: none;
            border-radius: 4px;
            cursor: pointer;
        }
        input[type="submit"]:hover {
            background-color: #45a049;
        }
        a {
            display: inline-block;
            margin: 10px 0;
            padding: 10px;
            background-color: #008CBA;
            color: white;
            text-decoration: none;
            border-radius: 5px;
        }
        a:hover {
            background-color: #007B9A;
        }
            table {
        width: 100%;
        border-collapse: collapse;
        }
        th, td {
            padding: 15px;
            text-align: left;
            border-bottom: 1px solid #ddd;
        }
        th {
            background-color: #4CAF50;
            color: white;
        }
        tr:hover {background-color: #f5f5f5;}
    </style>
<body>

<div class="container">
    <a href="/">物料计算</a>
        <a href="/func"  style="background-color: gray">资产管理</a>
    <a href="/store" >库存管理</a>
<h1>ERP 资产负债计算</h1>
 <form action="/func/" enctype="application/x-www-form-urlencoded" method="post">
            <label>
               变量名:<br>
                <select name="x" required>
                    {% for item in x_available %}
                    <option value="{{ item }}">{{ item }}</option>
                    {% endfor %}
                </select>
            </label>
            <input type="submit" value="添加">
        </form>
        <h2>公式列表</h2>
        <a href="/func/?action=show">计算</a>
        <a href="/func/?action=clear">清空</a>
        <table>
            <thead>
                <tr>
                    <th>公式</th>
                </tr>
            </thead>
            <tbody>
                {% for item in func_output %}
                <tr>
                    <td>{{ item }}</td>
                </tr>
                {% endfor %}
            </tbody>
        </table>
    </div>
</body>
</html>